import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsOptional, IsBoolean, MaxLength } from 'class-validator';

/**
 * 查看文件DTO
 */
export class ViewFilesDto {
  @ApiProperty({ description: '文件路径', example: '/path/to/directory' })
  @IsString()
  @MaxLength(500, { message: '文件路径不能超过500个字符' })
  filePath: string;

  @ApiProperty({ 
    description: '是否递归查看子目录', 
    example: false, 
    required: false,
    default: false 
  })
  @IsOptional()
  @IsBoolean()
  recursive?: boolean;

  @ApiProperty({ 
    description: '是否显示隐藏文件', 
    example: false, 
    required: false,
    default: false 
  })
  @IsOptional()
  @IsBoolean()
  showHidden?: boolean;
}